var frisby = require('frisby');

frisby.create('获取飞机信息')
    .post('http://192.168.247.88:9090/hub/tail/get-tails',{
        'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
        'MD5':'MD5'
       })
    // .inspectJSON()
    .expectJSON({
        "result":{
          "MD5":'MD5',
          "tails":Array,
          "sync_tail_time":'2013-10-30T14:33:36+08:00'
        }})
    .expectJSON('result.tasks.?', {
        "tail_number":"5236",
        "model":"TDEG",
        "config":"ngve",
        "majorconfig":"",//"性能包组"(可为空),
        "minorconfig":""//"性能包"(可为空)
      })

.toss()


frisby.create('错误信息')
    .post('http://192.168.247.88:9090/hub/tail/get-tails',{
        'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
        'MD5':'MD5'
      })
    // .inspectJSON()
    .expectJSON({
        "result":{
          "error-code":"006",
          "error-message":"错误信息"
        }})
.toss()
